﻿<Window xmlns:my="clr-namespace:Vision.VisionWorkshop.Controls"  x:Class="Vision.VisionWorkshop.Windows.ActivityRun"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:common="clr-namespace:Vision.VisionWorkshop.Common"
        xmlns:sadv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
        xmlns:sadc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
        Title="Run Activity" Height="300" Width="580" ResizeMode="NoResize" WindowStyle="ToolWindow" Loaded="Window_Loaded">
    <Window.Resources>
        <sadc:ArgumentToExpressionConverter x:Key="argumentToExpressionConverter" />
        
        <DataTemplate x:Key="ArgumentTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding Name}" />
                <sadv:ExpressionTextBox Grid.Column="1" VerticalAlignment="Stretch" ExpressionType="{Binding Type.GetGenericArguments()[0]}" Expression="{Binding Value, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}" />
                <!--<TextBox Grid.Column="1" Text="{Binding Value, Converter={StaticResource ValueExpressionConverter}}"  />-->
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <Border BorderThickness="1" BorderBrush="BlanchedAlmond" Name="ctlTypeBrowserBorder"/>
        <ItemsControl x:Name="icArguments" ItemTemplate="{StaticResource ArgumentTemplate}" />
    </Grid>
</Window>
